import * as THREE from "three"
export class Background {
    url: string
    scene: THREE.Scene
    constructor(scene: THREE.Scene) {
        this.url = "/src/assets/img/black-bg.png"
        this.scene = scene
        this.init()
    }
    init() {
        const loader = new THREE.TextureLoader()
        const geometry = new THREE.SphereGeometry(3000, 30, 30)
        const material = new THREE.MeshBasicMaterial({
            side: THREE.DoubleSide,
            map: loader.load(this.url)
        })
        const sphere = new THREE.Mesh(geometry, material)
        sphere.position.set(0, 0, 0)
        this.scene.add(sphere)
    }
}